package com.learn.repository;

import com.learn.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * Created by weijianxing on 4/8/15.
 */
@Repository
public interface UserRepo extends JpaRepository<User, Long> {


    @Query("SELECT u FROM User u WHERE u.username = ?1")
    public User findUserByUserName(String username);
}
